//
//  RBCommentPhotoSelectView.h
//  WaitBuyer
//
//  Created by Lan on 2018/10/12.
//  Copyright © 2018年 SummerTea. All rights reserved.
//  autolayout方式实现高度变化

#import <UIKit/UIKit.h>

@interface RBGrowablePhotoContainer : UIView


+ (instancetype)viewWithMaxNum:(NSInteger)maxNum colNum:(NSInteger)colNum editable:(BOOL)editable viewWidth:(CGFloat)viewWidth itemH:(CGFloat)itemH;

/**
 * maxNum最多可选取张数
 * colNum列数
 * editable是否可以添加删除
 * viewWidht视图宽度,一定要准
 */
+ (instancetype)viewWithMaxNum: (NSInteger)maxNum
                        colNum: (NSInteger)colNum
                      editable: (BOOL)editable
                     viewWidth: (CGFloat)viewWidth;

/** 默认是UIImage集合 */
@property(nonatomic, strong, readonly)NSMutableArray *photos;
/** 视图高度,首次取视图高度用于初始化布局,之后会自动更新 */
@property(nonatomic, assign, readonly) CGFloat viewHeight;
/** 默认是url/UIImage集合 */
- (void)addPhotos:(NSArray *)array;

@end
